<script setup lang="ts">
import {NavItem} from "../../../favorites/authorized";

defineProps<{
  items: NavItem[]
}>()
</script>

<template>
  <div class="grid auto-rows-auto grid-cols-2 gap-[12px]">
    <section v-for="item of items" :key="item.id">
      <a :href="item.link" rel="noreferrer" target="_blank" class="group">
        <section
          class="flex h-full flex-col border-1  border-solid border-[var(--vp-c-border)]/[.55] rounded-[8px] leading-[24px] px-[24px] py-[12px] group-hover:shadow"
        >
          <span class="text-gray-600 group-hover:text-gray-800 dark:text-gray-300 dark:group-hover:text-gray-100">
            {{ item.text }}
          </span>
          <span
            class="mb-auto text-sm text-gray-700 opacity-50 dark:text-gray-300 dark:group-hover:text-gray-50 min-h-[20px]"
          >
            {{ item.desc ?? item.text }}
          </span>
        </section>
      </a>
    </section>
  </div>
</template>
